<nz-table #ajaxTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="dataSet" [nzLoading]="loading"
  [nzTotal]="total" [nzShowTotal]="totalTemplate" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize"
  (nzPageIndexChange)="searchData()" (nzPageSizeChange)="searchData(true)" [nzScroll]="{ x:'1200px',y: '400px' }">
  <thead>
    <tr>
      <th nzWidth="60px" nzLeft="0px">序号</th>
      <th nzWidth="100px">图片</th>
      <th nzWidth="150px">名称</th>
      <th nzWidth="80px" style="color: red">库存(瓶)</th>
      <th nzWidth="80px">类型</th>
      <th nzWidth="80px">香型</th>
      <th nzWidth="80px">酒精度</th>
      <th nzWidth="80px">容量</th>
      <th nzWidth="100px">价格(元/瓶)</th>
      <th nzWidth="120px">酒币抵扣数(个)</th>
      <th nzWidth="90px" nzRight="0px">操作</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of ajaxTable.data;index as i">
      <td nzLeft="0px">{{i+1}}</td>
      <td> <img *ngIf="data.img" [src]="data.img" class="avatar" style="width: 50px; height:50px;"></td>
      <td>{{data.winename}}</td>
      <td>{{data.stock}}</td>
      <td>{{data.typename}}</td>
      <td>{{data.Aroma}}</td>
      <td>{{data.Alcohol}}</td>
      <td>{{data.capacity}}</td>
      <td>{{data.price}}</td>
      <td>{{data.num}}</td>
      <td nzRight="0px">
        <a (click)="edit(data._id)">修改库存</a>
        <a *ngIf="data.status==1" (click)="lock(data._id)" title="下架">下架</a>
        <a *ngIf="data.status==0" (click)="open(data._id)" title="上架">上架</a>
      </td>
    </tr>
  </tbody>
</nz-table>

<ng-template #totalTemplate let-total>
  共 {{total}} 条
</ng-template>
<nz-modal [(nzVisible)]="addisVisible" nzTitle="修改库存" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"
  nzWrapClassName="vertical-center-modal" [nzMaskClosable]="false" nzWidth="400">
  <div class="scrollbar">
    <nz-input-group nzAddOnBefore="库存(瓶)">
      <nz-input-number [(ngModel)]="doc.stock" [nzMin]="-1000" [nzMax]="10000" [nzStep]="1"></nz-input-number>
    </nz-input-group>
  </div>
</nz-modal>